export enum QueryType {
  //模糊双向
  LIKE = 1,
  //左模糊
  LIKE_L = 2,
  //右模糊
  LIKE_R = 3,
  //匹配
  EQ = 4,
  //不包含
  NOT_IN = 5,
  //包含
  IN = 6,
  //小于等于
  LE = 7,
  //大于等于
  GE = 8,
  //小于等于
  LT = 9,
  //大于等于
  GT = 10,
  //不等于
  NE = 11
}

export enum OrgConvertType {
  //组织名称
  ORG_NAME = 1,
  //组织短名称
  ORG_SHORT_NAME = 2,
  //组织全路径
  ORG_LOCATION = 3
}
export enum AreaConvertType {
  //地区名称
  NAME = 1,
  //地址
  ADDRESS = 2
}
export type QueryItemType = {
  //值
  value: any
  //参数是否加后缀
  suffix?: boolean
  //查询方式
  queryType?: QueryType
  //是否允许清空
  clear?: boolean
}
export type QueryFormDataType = {
  [key: string]: any
}

export type QueryFormType = {
  [key: string]: QueryItemType
}

export type ExportColumnType = {
  //字段名称
  name: string
  //标题名称
  title: string
}
export type ExportType = {
  column: ExportColumnType[]
}

export type OrgType = {
  //转换字段
  name: string
  //转换方式
  type: OrgConvertType
  rename?: string
}

export type DicType = {
  name: string
  code: string
  rename?: string
}

export type AreaType = {
  //转换字段
  name: string
  //转换方式
  type: AreaConvertType
  rename?: string
}

export type DateType = {
  //转换自动
  name: string
  //时间格式化
  format: string
  rename?: string
}

export type ConvertType = {
  //字典转换
  dicConvert?: DicType[]
  //地址转换
  areaConvert?: AreaType[]
  //时间格式化
  dateFormat?: DateType[]
  //组织转换
  orgConvert?: OrgType[]
}

export type TableModel = {
  //查询表单高度
  height?: number
  //每页条数
  pageSize?: number
  //开启选择
  select: boolean
  //是否多选
  multiple: boolean
  //当前也
  currentPage?: number
  loadUrl: string
  //导出配置
  export?: ExportType
  //转换配置
  convert?: ConvertType
  //是否首次加载
  fristLoad?: boolean
  //查询表单按钮大小
  size?: string
  //是否查询表单change事件触发查询
  changeLoad?: boolean
  //是否计算高度
  isLayout?: boolean
  //表格高度
  tableHeight?: string
  //高度偏移量
  offsetHeight?: number
}
